//
//  CinemaHeader.m
//  StatisticsData
//
//  Created by zhaochengfeng on 2016/12/23.
//  Copyright © 2016年 bmwl. All rights reserved.
//

#import "CinemaHeader.h"
#import "LYCircleView.h"
#import <MJExtension/MJExtension.h>

@interface CinemaHeader ()<LYCircleViewDelegate,LYCircleViewDataSource>
@property (weak, nonatomic) IBOutlet UIView *backView;
@property (nonatomic, strong)LYCircleView *circle;
@end
@implementation CinemaHeader

- (void)awakeFromNib {
    [super awakeFromNib];
    self.mj_w = self.bounds.size.width;
    _circle = [[LYCircleView alloc]initWithFrame:CGRectMake(0, 0, self.backView.bounds.size.width, self.backView.bounds.size.height - 50)];
    _circle.dataSource = self;
    _circle.delegate = self;
    [self.backView addSubview:_circle];
    [self.circle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(self.backView);
    }];
    
}

- (void)didSelectCircleViewAtIndex:(NSInteger)index{
    NSLog(@"%ld",index);
}

- (NSArray *)percentOfTheCircle{
    return @[@"49.7",@"19.3",@"18.0",@"12.6",@"0.4"];
}

- (NSArray *)textStringOfCircle{
    return @[@"你的名字", @"湄公河行动", @"长城", @"摆渡人", @"其他"];
}

- (NSArray *)hexStringOfCircleColor{
    return nil;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
